<?php
//$server="localhost";
//$uname="root";
//$pwd="123456";
//$db="ali";
//$con=mysqli_connect($server,$uname,$pwd,$db);
//
//$uname=$_POST['uname'];
//$uage=$_POST['uage'];
//$uads=$_POST['uads'];
//
//if ($con){
//$sql="insert into  student(uname,uage,uads) values('$uname','$uage','$uads')";
//$run=mysqli_query($con,$sql);
//    if($run){
//        echo "数据表数据添加成功";
//    }else{
//        echo "已连接数据库，但未能添加数据! 请稍后再试试！";
//    }
//}else{
//    echo "未连接数据库，错误内容：".mysqli_connect_error();
//}

$server="localhost";
$uname="root";
$pwd="123456";
$db="ali";
$con=mysqli_connect($server,$uname,$pwd,$db);
$uname=$_POST['uname'];
$uage=$_POST['uage'];
$uads=$_POST['uads'];

if ($con){
    $sql="insert into ay(uname,uage,uads) values('$uname','$uage','$uads')";
    $run=mysqli_query($con,$sql);
    if($run){
        echo "数据表数据添加成功";
    }else{
        echo "已连接数据库，但未能添加数据！请稍后再试试!";
    }
}else{
    echo "未连接数据库，错误内容：" .mysqli_connect_error();
}
